<?php

namespace app\models;
use yii\db\ActiveRecord;


class SemLog extends ActiveRecord
{
    public function rules()
    {
        return [
            ['id', 'integer' ],
            ['yq_day_amount', 'integer'],
            ['yq_day_fee', 'number'],
            ['sq_day_amount', 'integer'],
            ['sq_day_fee', 'number'],
            ['yx_day_amount', 'integer'],
            ['yx_day_fee', 'number'],
            ['tb_day_amount', 'integer'],
            ['tb_day_fee', 'number'],
            ['tbsq_day_amount', 'integer'],
            ['tbsq_day_fee', 'number'],
            ['tbyx_day_amount', 'integer'],
            ['tbyx_day_fee', 'number'],
            ['wt_day_amount', 'integer'],
            ['qd_day_amount', 'integer'],
            ['day_income', 'number'],
            ['day_area', 'number'],
            ['data_date', 'required', 'message' => '请务必填写值.'],
            ['fans_amount', 'integer'],
            ['article_amount', 'integer'],
            ['publish_amount', 'integer'],
            ['readed_fee', 'integer'],
            ['repeat_amount', 'integer'],
            ['channel_amount', 'integer'],
            ['advice_amount', 'integer'],


        ];
    }
    public function getWxLogs()
    {
        return $this->hasOne(WxLog::className(), ['data_date' => 'data_date'] );
        // return $this->hasOne(Region::className(), ['id' => 'parent_region_id'])->viaTable(Region::tableName() . 'as d',  ['id' => 'region_id']);
    }

}

?>
